package es.ats.codington.festival.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import es.ats.codington.festival.domain.EventSignUp;
/**
 * 
 * @author Codington_RED
 *
 */
public class EventSignUpMapper implements RowMapper<EventSignUp>{
	/**
	 * mapper to register into an event
	 * @param resulSet
	 * @param numRow
	 * @return eventsu
	 * @throws SQLException
	 */
	@Override
	public EventSignUp mapRow(ResultSet resultSet, int numRow) throws SQLException {
		EventSignUp eventsu = new EventSignUp();
		
		eventsu.setId(resultSet.getInt("id"));
		eventsu.setIdEvent(resultSet.getInt("idEvent"));
		eventsu.setIdVisitor(resultSet.getInt("idVisitor"));
	
		return eventsu;
	}
}
